import request from '@/utils/request'

export function getVideoList(query) {
  console.log(query)
  return request({
    url: '/videos',
    method: 'get',
    params: query
  })
}

export function getVideoInfo(id) {
  return request({
    url: '/videos/' + id,
    method: 'get'
  })
}

export function addVideo(data) {
  return request({
    url: '/videos',
    method: 'post',
    data
  })
}

export function updateVideo(data) {
  return request({
    url: '/videos/' + data.id,
    method: 'put',
    data
  })
}
export function updateVideoStatus(data) {
  return request({
    url: '/videos/status',
    method: 'post',
    data
  })
}
export function deleteVideo(id) {
  return request({
    url: '/videos/' + id,
    method: 'delete'
  })
}
